package com.eva.admin.biz.system;

import com.eva.framework.config.AppConfig;
import com.eva.framework.config.SystemConfigHelper;
import com.eva.framework.dict.utils.SystemDictHelper;
import com.eva.system.config.model.ClientConfig;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AdminConfigBiz {

    @Resource
    private AppConfig appConfig;

    /**
     * 获取客户端配置
     *
     * @return 客户端配置
     */
    public ClientConfig getClientConfig() {
        ClientConfig config = new ClientConfig();
        config.setConfigMap(SystemConfigHelper.build(appConfig.getId()).getMap());
        config.setDictMap(SystemDictHelper.build(appConfig.getId()).getMap());
        return config;
    }
}
